home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / t-bcinfo.zip / TI718.ZIP / TI718.ASC
Text File  |  1992-02-25  |  964b  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                            NUMBER  :  718
  9.   VERSION  :  2.0
  10.        OS  :  DOS
  11.      DATE  :  February 25, 1992                        PAGE  :  1/1
  12.  
  13.     TITLE  :  Printing the Date and Time of a File
  14.  
  15.  
  16.  
  17.  
  18.   /*************************************************************
  19.       This program will print the date and time of a file.
  20.   *************************************************************/
  21.  
  22.   #include <dir.h>
  23.   #include <io.h>
  24.  
  25.   union FF
  26.   {
  27.           unsigned i[2];
  28.           struct ftime f;
  29.   } u;
  30.  
  31.   main()
  32.   {
  33.           struct ffblk ff;
  34.  
  35.           findfirst("tc.exe", &ff, 0);
  36.           u.i[0]= ff.ff_ftime;
  37.           u.i[1]= ff.ff_fdate;
  38.           printf("date= %d/%d/%d   time= %d:%d:%d\n",
  39.                   u.f.ft_month, u.f.ft_day, u.f.ft_year+80,
  40.                   u.f.ft_hour, u.f.ft_min, u.f.ft_tsec);
  41.  
  42.           return 0;
  43.   }
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.